package com.smedi.ismedi.inmail.core.domain.repository;

import com.smedi.ismedi.inmail.core.domain.aggregatemodel.Criteria;
import com.smedi.ismedi.inmail.core.domain.aggregatemodel.TaskRecord;

import java.util.List;

public interface TaskRecordRepository {
    List<TaskRecord> doListBySourceFromId(Long id);

    Boolean doDeleteBySourceIds(List<TaskRecord> taskRecords);

    List<TaskRecord> doList(TaskRecord taskRecord);

    List<TaskRecord> doList(List<Long> ids);

    TaskRecord doInsert(TaskRecord taskRecord);

    List<TaskRecord> doListBySourceFromIdAndOldStatus(Long sourceFromId, String oldStatus);

    List<TaskRecord> doInsertList(List<TaskRecord> taskRecord);

    TaskRecord doUpdate(TaskRecord taskRecord);

    TaskRecord doUpdateTaskDaily(TaskRecord taskRecord);

    List<TaskRecord> doUpdateList(List<TaskRecord> taskRecords);

    Boolean doUpdateStatusByOldStatus(TaskRecord taskRecord);

    Boolean doDeleteList(List<Long> id);

    List<TaskRecord> doQueryTaskByTypeAndStatus(String taskName, String status);

    List<TaskRecord> doQueryTask(Criteria criteria);

    boolean deleteHistoryTask();

    boolean cancelTask(TaskRecord taskRecord);
}
